/**
 * Created by 高磊 on 2017/2/13.
 */
(function (angular) {
    var app=angular.module("mainApp.subject",["httpApp"]);
    app.controller("subjectCtrl",["$scope","$routeParams","jsonpService",function ($scope,$routeParams,jsonpService) {
        $scope.subject={};
        var url='https://api.douban.com/v2/movie/subject/'+$routeParams.id;
        var params={
            'apikey':'00fa6c0654689a0202ef4412fd39ce06'
        }
        jsonpService.getJSONP(url,params,function (data) {
            $scope.subject=data;
            $scope.$apply();
        })
    }])
})(angular)